package org.lzy.aibg.controller;

import org.lzy.aibg.config.DataSourceBatch;
import org.lzy.aibg.config.DataSourceProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @Autowired
    private DataSourceProperties dataSourceProperties;
    @Autowired
    private DataSourceBatch dataSourceBatch;
    @RequestMapping("/hello")
    public String hello() {
        return "hello springboot";
    }

    @RequestMapping("/config")
    public String getDataSource() {
        return dataSourceProperties.toString();
    }

    @RequestMapping("/batch")
    public String getDataSourceBatch() {
        return dataSourceBatch.toString();
    }
}
